\tikzstyle{decision} = [diamond, draw, fill=blue!20,
  text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt]
\tikzstyle{block} = [rectangle, draw, fill=blue!20,
  text width=5em, text centered, rounded corners, minimum height=4em]
\tikzstyle{line} = [draw, -latex']
\tikzstyle{cloud} = [draw, ellipse, fill=red!20, node distance=3cm,
  minimum height=2em]

\begin{tikzpicture}[node distance = 2cm, auto]
    % Place nodes
    \node [block] (init) {initialize model, temperature \emph{T} and function f(T)};
    \node [block, below of=init] (energy) {compute energy of current model};
    \node [block, below of=energy] (mutate) {generate mutation of current model};
    \node [block, below of=mutate] (evaluate) {compute energy of mutation};
    \node [decision, below of=evaluate] (decide) {energy of mutation lower?};
    \node [block, left of=evaluate] (replace) {replace current model with mutation};
    \node [block, below of=decide] (tempcheck) {generate random number $R$ between 0 and 1};
    \node [decision, below of=tempcheck] (decideSecond) {is random number higher than f(T)?};
    \node [block, below of=decide, node distance=3cm] (stop) {stop};
    % Draw edges
    \path [line] (init) -- (identify);
    \path [line] (identify) -- (evaluate);
    \path [line] (evaluate) -- (decide);
    \path [line] (decide) -| node [near start] {yes} (update);
    \path [line] (update) |- (identify);
    \path [line] (decide) -- node {no}(stop);
    \path [line,dashed] (expert) -- (init);
    \path [line,dashed] (system) -- (init);
    \path [line,dashed] (system) |- (evaluate);
\end{tikzpicture}
